<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>计算器</title>
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
	<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body >
<table class="table table-hover">
	<caption>悬停表格布局task3</caption>
	<thead>
		<tr>
			<th>名称</th>
			<th>状态</th>
			<th>故事</th>
			<th>修改</th>
		</tr>
	</thead>
	<tbody>
		<tr ng-repeat="t in rs">
			<td>
			<span ng-hide='edit{{$index}}'>{{t.name}}</span>
			<input ng-show='edit{{$index}}'   type="text" ng-model="t.name">
			</td>
				<td>
			<span ng-hide='edit{{$index}}'>{{t.status}}</span>
			<input ng-show='edit{{$index}}'   type="text" ng-model="t.status">
			</td>
				<td>
			<span ng-hide='edit{{$index}}'>{{t.story}}</span>
			<input ng-show='edit{{$index}}'   type="text" ng-model="t.story">
			</td>
			<td>
			<button ng-hide='edit{{$index}}' type="button" class="btn btn-success" ng-click="update($index)">修改</button>
			<button ng-hide='edit{{$index}}' type="button" class="btn btn-danger" ng-click="deleteRecord(t,$index)">删除</button>
			<button ng-show='edit{{$index}}' type="button" class="btn btn-success" ng-click="update2(t,$index)">确定</button>
			<button ng-show='edit{{$index}}'  type="button" class="btn btn-success" ng-click="cancelUpdate($index)">取消</button>
			</td>
		</tr>
	</tbody>
</table>

</body>
</html>